1 Documentation for the IRTrans Shared Library
4 The IRTrans Shared Library allows to control IRTrans devices through own programms.
6 The Shared Lib is available for Windows (IRTransDLL.dll) and LINUX (libIRTrans.so).
20 The IRTrans system is always controlled using a TCP/IP based server software (irserver).
21 The Shared LIB connects to this server via port TCP/21000 and allows to control the
22 IRTrans system. In addition some of the functions are also available directly when
23 connected to an IRTrans LAN device with integrated IRDB.
24 Once connected the client programm can operate the IRTrans device(s).
29 **************************************************************
33 **************************************************************
36 int ConnectIRTransServer (char host[],SOCKET *sock)
38 Connect to an IRTrans server. This is the first step needed
39 to establish communication with the IRTrans system.
40 The IP / hostname can also refer to an IRTrans Ethernet module.
41 Of course multiple connections are supported.
46 LAN DB modules all versions
53 Hostname or IP Address where the server is running.
54 This can be localhost for a server running on the same system or
55 the IP / hostname of a remote server.
60 Pointer to a SOCKET where the handle for the connection is stored.
66 != 0 Error Code returend (Definitions in errcode.h)
69 --------------------------------------------------------------
72 void DisconnectIRTransServer (SOCKET serv)
74 Closes the connection with the irserver
79 LAN DB modules all versions
86 Connection handle for the irserver connection
89 --------------------------------------------------------------
92 NETWORKSTATUS *ReloadIRDatabase (SOCKET serv)
94 Reloads the IR Database files. Only needed when the files
95 are changed manually. When learning codes through the server
96 the correct status is always maintained by the irserver.
101 LAN DB modules not supported / needed
108 Connection handle for the irserver connection
113 0 Call succeeded / no Error
114 != 0 NETWORKSTATUS structure describing the Error
119 **************************************************************
123 **************************************************************
126 NETWORKSTATUS *SendRemoteCommand (SOCKET serv, char rem[],char com[],int mask,int LEDSel,int bus)
133 LAN DB modules all versions
140 Connection handle for the irserver connection
144 Name of the remote control
148 Name of the IR Command
152 Address mask for the IRTrans serial Bus. Contains a 16 Bit bit mask for up to 16 devices.
153 0xffff -> Send to all devices on the Bus
157 Select the LEDs used to send.
160 0 Default (as set in devices EEPROM)
167 Select the LAN / USB / RS232 device connected to the server. 0 = first device, 1 = 2nd and so on.
168 255 selects all busses / devices.
172 0 Call succeeded / no Error
173 != 0 NETWORKSTATUS structure describing the Error
176 --------------------------------------------------------------
179 NETWORKSTATUS *SendRemoteCommandEx (SOCKET serv,char rem[],char com[],word mask,byte LEDSel,byte bus)
181 Send an IR Code. Extended external LED selection.
187 LAN DB modules all versions
194 Connection handle for the irserver connection
198 Name of the remote control
202 Name of the IR Command
206 Address mask for the IRTrans serial Bus. Contains a 16 Bit bit mask for up to 16 devices.
207 0xffff -> Send to all devices on the Bus
211 Select the LEDs used to send.
215 0 or d Default (as set in devices EEPROM)
219 1 to 8 External LEDs of LAN Controller / LAN Controller XL
223 Select the LAN / USB / RS232 device connected to the server. 0 = first device, 1 = 2nd and so on.
224 255 selects all busses / devices.
228 0 Call succeeded / no Error
229 != 0 NETWORKSTATUS structure describing the Error
232 --------------------------------------------------------------
235 NETWORKSTATUS *SendCCFCommand (SOCKET serv,char ccfstr[],byte repeat,word mask,byte LEDSel,byte bus)
238 Send an IR Code defined by a CCF/Philips Pronto Hex Code. Extended external LED selection.
244 LAN DB modules all versions
251 Connection handle for the irserver connection
255 Text string with the CCF Hex Code (Format like: "0000 007D 0013 0044 ....".
256 Max. Length of the String: 256 Hex words
261 Address mask for the IRTrans serial Bus. Contains a 16 Bit bit mask for up to 16 devices.
262 0xffff -> Send to all devices on the Bus
266 Select the LEDs used to send.
270 0 or d Default (as set in devices EEPROM)
274 1 to 8 External LEDs of LAN Controller / LAN Controller XL
278 Select the LAN / USB / RS232 device connected to the server. 0 = first device, 1 = 2nd and so on.
279 255 selects all busses / devices.
283 0 Call succeeded / no Error
284 != 0 NETWORKSTATUS structure describing the Error
287 --------------------------------------------------------------
290 NETWORKSTATUS *SendCCFCommandLong (SOCKET serv,char ccfstr[],byte repeat,word mask,byte LEDSel,byte bus)
293 Send an IR Code defined by a CCF/Philips Pronto Hex Code. Support for long CCF Codes.
294 Extended external LED selection.
300 LAN DB modules Ethernet version >= 1.05.10
307 Connection handle for the irserver connection
311 Text string with the CCF Hex Code (Format like: "0000 007D 0013 0044 ....".
312 Max. Length of the String: 450 Hex words
317 Address mask for the IRTrans serial Bus. Contains a 16 Bit bit mask for up to 16 devices.
318 0xffff -> Send to all devices on the Bus
322 Select the LEDs used to send.
326 0 or d Default (as set in devices EEPROM)
330 1 to 8 External LEDs of LAN Controller / LAN Controller XL
334 Select the LAN / USB / RS232 device connected to the server. 0 = first device, 1 = 2nd and so on.
335 255 selects all busses / devices.
339 0 Call succeeded / no Error
340 != 0 NETWORKSTATUS structure describing the Error
343 **************************************************************
347 **************************************************************
350 NETWORKSTATUS *LearnIRCode (SOCKET serv, char rem[],char com[],unsigned short timeout)
357 irserver all versions
358 LAN DB modules Learning of codes is only supported through the irserver
365 Connection handle for the irserver connection
369 Name of the remote control
373 Name of the IR Command
375 unsigned short timeout
377 Time to wait for the IR Code
381 0 Call succeeded / no Error
382 != 0 NETWORKSTATUS structure describing the Error
385 --------------------------------------------------------------
388 NETWORKSTATUS *LearnRepeatIRCode (SOCKET serv, char rem[],char com[],unsigned short timeout)
390 Learn a repeat IR Code (Code that is sent when the button is held down)
394 irserver all versions
395 LAN DB modules Learning of codes is only supported through the irserver
402 Connection handle for the irserver connection
406 Name of the remote control
410 Name of the IR Command
412 unsigned short timeout
414 Time to wait for the IR Code
418 0 Call succeeded / no Error
419 != 0 NETWORKSTATUS structure describing the Error